package com.dstz.demo.rest.controller;

import com.dstz.base.manager.impl.BaseManager;
import com.dstz.base.rest.BaseController;
import com.dstz.demo.core.dao.VeSubClassDao;
import com.dstz.demo.core.manager.VeSubClassManager;
import com.dstz.demo.core.model.VeSubClass;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
@RestController
@RequestMapping("/sys/VeSubClass")
public class VeSubClassController extends BaseController<VeSubClass> {
    @Resource
    VeSubClassManager veSubClassManager;
    @PostMapping("/saves/{id}")
    public Integer savess(@PathVariable("id") String id) {
        VeSubClass veSubClass=new VeSubClass();
        veSubClass.setBuild_id(id);
        veSubClass.setMaterial_coding("");
        veSubClass.setSubclass_brand("");
        veSubClass.setSubclass_model("");
        veSubClass.setSubclass_name("");
        veSubClass.setSubclass_parameter("");
        veSubClass.setSubclass_note("");
        return veSubClassManager.savess(veSubClass);
    }

    @Override
    protected String getModelDesc() {
        return null;
    }

    @GetMapping("/deletes/{id}")
    public Integer deletes(@PathVariable("id") String id){
        return veSubClassManager.deletes(id);
    }
}
